﻿<%@ include file="../include/top.jsp"%>
<%@ include file="../include/errorArea.jsp" %>
<link rel="stylesheet" href="${baseURL}/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script language="javascript" type="text/javascript" src="${baseURL}/js/jquery.ztree.all-3.5.min.js">
</script>
<script  type="text/javascript" src="${baseURL}/js/jquery.validate.js"></script>
<script  type="text/javascript" src="${baseURL}/js/jquery-1.8.3.js"></script>
<SCRIPT type="text/javascript">
	var setting = {
		view: {
			dblClickExpand: false
		},
		data: {
			simpleData: {
				enable: true
			}
		},
		callback: {
			onClick: onClick
		}
	};

	var zNodes = ${treedata}; //后台返回的数据

	function onClick(e,treeId, treeNode) {
		var zTree = $.fn.zTree.getZTreeObj("treeDemo");
		zTree.expandNode(treeNode);

		//叶节点，并且不是第一层节点(第一层节点的pId是null)
		//if(!treeNode.isParent && treeNode.pId!=null){
			nodes = zTree.getSelectedNodes();
			$("#selectedNodeName").attr("value", treeNode.name);
			$("#nodeId").attr("value", treeNode.id);
		//}
	}

	function showMenu() {
		var cityObj = $("#selectedNodeName");
		var cityOffset = $("#selectedNodeName").offset();
		$("#menuContent").css({left:cityOffset.left + "px", top:cityOffset.top + cityObj.outerHeight() + "px"}).slideDown("fast");

		$("body").bind("mousedown", onBodyDown);
	}
	function hideMenu() {
		$("#menuContent").fadeOut("fast");
		$("body").unbind("mousedown", onBodyDown);
	}
	function onBodyDown(event) {
		if (!(event.target.id == "menuBtn" || event.target.id == "selectedNodeName" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length>0)) {
			hideMenu();
		}
	}

	$(document).ready(function(){
		$.fn.zTree.init($("#treeDemo"), setting, zNodes);
		
		var treeObj = $.fn.zTree.getZTreeObj("treeDemo");
		var nodes = treeObj.getNodesByParam("id", "${formdata.nodeId}", null);
		if (nodes.length>0) {
			treeObj.selectNode(nodes[0]);
		}

	});
	$('#print_button').click(function(){
		$('#printArea').printArea();
	});
</SCRIPT>
<div id="printArea">
<c:if test="${not empty obj}">

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" id="listOutTable">
  <tr>
    <td colspan="2" align="left" valign="middle" class="text_gray2"><table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#96bee2">
      <tr>
        <td height="21" background="${baseURL}/images/table_bg.jpg">&nbsp;&nbsp;
        <span class="text_blue_b">
        <img src="${baseURL}/images/008.png" width="16" height="16" align="absmiddle" />&nbsp;会员信息：</span></td>
      </tr>
      <tr>
        <td height="13" valign="top" bgcolor="#FFFFFF">
        <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF" id="listTable">
<tr>
       	<td class="t2">姓名：</td>
           <td>
           		${obj.realName}
           </td>
       </tr>
        <tr>
       	<td class="t2">注册码：</td>
           <td>
           		${obj.bindCode}
           </td>
       </tr>
        <tr>
       	<td class="t2">电子邮箱：</td>
           <td>
           		${obj.email}
           </td>
       </tr>
       <tr>
       	<td class="t2">固定电话：</td>
           <td>
           		${obj.telephone}
           </td>
       </tr>
       <tr>
       	<td class="t2">手机：</td>
           <td>
           		${obj.mobile}
           </td>
       </tr>
       <tr>
       	<td class="t2">生日：</td>
           <td>
           		<c:if test="${obj.birthday!=null}"><fmt:formatDate value="${obj.birthday}" pattern="yyyy-MM-dd" /></c:if>
           </td>
       </tr>
       <tr>
       	<td class="t2">性别：</td>
           <td>
           		<label><c:if test="${obj.sex=='0'}">男</c:if>
               <c:if test="${obj.sex=='1'}">女</c:if> </label>
           </td>
       </tr>
       <tr>
       	<td class="t2">家庭人数：</td>
           <td>
           		${obj.familyNumber}
           </td>
       </tr>
       <tr>
       	<td class="t2">职业：</td>
           <td>
           		${obj.occupation}
           </td>
       </tr>
       <tr>
       	<td class="t2">兴趣爱好：</td>
           <td>
           		${obj.interest}
           </td>
       </tr>
        </table>
        </td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#A6CAE8">
   <!--  <input type="button"  id="print_button" class="button_01_lef" value="打印" />
		 -->						
    </td>
  </tr>
  <tr>
    <td height="1" colspan="2" bgcolor="#A6CAE8"></td>
  </tr>
</table>
<script src="${ctx}/js/listProduct.js"></script>
</c:if>
</div>
<%@ include file="../include/bottom.jsp"%>